﻿				<?php
						//kiem tra quyen admin
						include("kiemtraquyen.php");
						//ket noi voi csdl
						include("connect.php");
							//cau lenh sql lay cac chu de tu csdl
							$sql="select * from chu_de";
							$query=mysql_query($sql);
							//hien theo danh dach select
							echo"<select name='chude' onChange=\"thayDoi(this.form,this.name);\">";
							//lay lan luot cac chu de
							while($row=mysql_fetch_array($query))
							{
								//ma_cd lam gia tri cho muc cua ds muc dich de lap trinh
								$ma_cd=$row["MA_CD"];
								//ten_cd de hien ra ngoai
								$ten_cd=$row["TEN_CD"];
								//hien ra trong danh sach lua chon
								if($ma_cd==6)
								{
									echo"<option value='$ma_cd' selected='true'>$ten_cd</option>";
								}
								else
								{
									echo"<option value='$ma_cd'>$ten_cd</option>";
								}
							}
							echo"</select>";
							$_SESSION["chude"]=1;
				?>